package main

import (
	"fmt"
	"time"
)

func main() {
	defer func() {
		if err := recover(); err != nil {
			fmt.Println(err)
			time.Sleep(time.Second * 10)
		}
	}()
	var err error
	mw := new(MyMainWindow)
	mw.bloodModel = NewBloodComBox()
	mw.porfModel = NewPorfComBox()
	err = mw.init()
	if err != nil {
		fmt.Println("mw.init err :", err)
		return
	}
	mw.initEvent()
	r := mw.run()
	fmt.Println("exit :", r)
	time.Sleep(time.Second * 10)

	//	var xymap = [...]win.POINT{{300, 520}, {400, 520}}
	//	var b bool
	//	for _, v := range xymap {
	//		b = win.SetCursorPos(v.X, v.Y)
	//		point := &win.POINT{}
	//		win.GetCursorPos(point)
	//		b = win.MouseEvent(win.MOUSEEVENTF_LEFTDOWN, point.X, point.Y)
	//		b = win.MouseEvent(win.MOUSEEVENTF_LEFTUP, point.X, point.Y)
	//		time.Sleep(time.Second / 2)
	//	}
	//	fmt.Println(b)
	//	win.KeyBDEvent(65, 0, 0, 0)
	//	win.KeyBDEvent(65, 0, win.KEYEVENTF_KEYUP, 0)
	///广告 出2.6万分1：120先钱后分打包200:2.5万分,因远程看不清聊天记录要的加Q：122798224
}
